<p id="notice"><%= notice %></p>

<p>
  <strong>标题:</strong>
  <%= @post.title %>
</p>

<p>
  <strong>内容:</strong>
  <%= @post.text %>
</p>
<h1>评论：</h1>
 <% @post.comments.each do |comment| %>  
  <p><%= comment.text %></p>  
  <p><%= time_ago_in_words comment.created_at %> ago </p> 
  <p><%= link_to "删除评论", [@post, comment], :method => :delete, :confirm => "Are you sure?" %></p>   
<% end %>  

<%= form_for [@post,@post.comments.build] do |f| %>  
  <p><%= f.text_area :text, :size => '40x10' %> </p>  
  <p><%= f.submit "提交评论" %> </p>  
<% end %>  

<%= link_to '编辑', edit_post_path(@post) %> |
<%= link_to '返回', posts_path %>｜
<%= link_to "删除",@post,:method => :delete, :confirm => "Are you sure?" %>  
 
